printa( [] ).
printa( [A|R] ) :- write( A ), write(' '), printa(R).

ask( Q, Key ) :- printa([ Q, '?' ]), nl, read( A ), printa(['A','es', A]), db( Key, A ).

showall( [] ).
showall( [Key|R] ) :- db( Key, A ), printa([ Key, 'is', A, ',' ]), showall( R ).

list :- 
	findall( Key, db(Key, _), Keys ),
	showall( Keys ).